libxl: init: libxl__poller_init and _get take gc
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 17 Dec 2013 15:20:25 +0000 (15:20 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 17 Mar 2014 15:53:59 +0000 (15:53 +0000)
commitcaafd3303d5519a2a47d9bbe9c8faf65a8e956e7
treed6fcdeb1d5bdd98132f3e2d96f19a96b7f3a3be1
parentd1f84a51fa92746bb78d8c4d5a907f03eaf52bbe
libxl: init: libxl__poller_init and _get take gc

Change libxl__poller_init and libxl__poller__get to take a libxl__gc*
rather than a libxl_ctx*.  The gc is not used for memory allocation
but simply to provide the standard local variable "gc" expected by the
convenience macros.  Doing this makes the error logging more
convenient.

Hence, convert the logging calls to use the LOG* convenience macros.

And consequently, change the call sites, and the function bodies to
use CTX rather than ctx.

Also convert a call to malloc() (with error check) in
libxl__poller_get, to libxl__zalloc (no error check needed).

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/libxl.c
tools/libxl/libxl_event.c
tools/libxl/libxl_internal.h